This written description is in the field of managing computer memory resources. More particularly, the description relates to selectively closing pages in a memory.
Many different types of computing systems have attained widespread use around the world. These computing systems include personal computers, servers, mainframes and a wide variety of stand-alone and embedded computing devices. Sprawling client-server systems exist, with applications and information spread across many PC networks, mainframes and minicomputers. In a distributed system connected by networks, a user may access many application programs, databases, network systems, operating systems and mainframe applications. Computers provide individuals and businesses with a host of software applications including word processing, spreadsheet, and accounting. Further, networks enable high speed communication between people in diverse locations by way of e-mail, websites, instant messaging, and web-conferencing.
A common architecture for high performance, single-chip microprocessors is the reduced instruction set computer (RISC) architecture characterized by a small simplified set of frequently used instructions for rapid execution. Thus, in a RISC architecture, a complex instruction comprises a small set of simple instructions that are executed in steps very rapidly. These steps are performed in execution units adapted to execute specific simple instructions. In a superscalar architecture, these execution units typically comprise load/store units, integer Arithmetic/Logic Units, floating point Arithmetic/Logic Units, and Graphical Logic Units that operate in parallel. In a processor architecture, an operating system controls operation of the processor and components peripheral to the processor. Executable application programs are stored in a computer's hard drive. The computer's processor causes application programs to run in response to user inputs.
Thus, in a modern system, a plurality of computers—including servers—are connected together through a network. Each computer may run application programs for performing certain functions. These application programs may include word-processing, e-mail, graphics, document viewing and mark-up, spreadsheet, database, music player, internet browser, photo-shop, games, anti-virus, as well as a host of other application programs too numerous to mention.
In a single processor computer system or a multi-processor computer system, where the Memory Controller (MC) uses Open Page policy for managing memory pages, it is possible that when the Operating System (OS) context switches from one process to another, the following may occur: (1) The memory pages opened by the exiting process will not be used by the incoming process, or (2) Several of the memory pages opened and used by the exiting process will be used by the same process the next time it is scheduled to run on the processor by the OS. Memory controllers are typically unaware of any OS level paradigms such as Process Identifier (PID) or the occurrence of a context switch. This lack of awareness potentially poses a performance issue.
When a process is context switched to execute on the processor, it will find pages in the open state in the memory which are different than the pages it needs to access for the process that the processor switches to. The probability of this happening increases as the number of contexts the OS must schedule increases. The probability of this happening also increases when the contexts have several pages they work with simultaneously, but do not share many pages with other contexts. In such a scenario, when a process is context switched in, it will likely find a page conflict every time it wants to access a new physical page, because a previous process opened a different page in the same bank. In such a case the memory controller would have to first close (pre-charge) the bank containing the page, and open (activate) the correct page, before accessing its contents. The pre-charge time incurred by the process will affect both performance and power characteristics of the memory controller.
Consider for example a single-context system which has 2 processes ready to execute: A and B. If process A is executing on the system, it will likely own all the open pages in the Memory Controller during its time slice. At the end of its time slice, process A is context-switched out in favor of process B. In a conventional system, since process B is unlikely to access any pages belonging to process A, it will have to close those open pages belonging to process A, before it can open its own pages. The burden of cleaning up the pages after the context switch is thus left to process B; so process B pays an additional performance penalty. The overhead of closing the pages adds to the critical latency of the memory access by the later context.